<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OpenShoe: power_clocks_lib.c File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenShoe
   &#160;<span id="projectnumber">0.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">power_clocks_lib.c File Reference</div>  </div>
</div>
<div class="contents">

<p>High-level library abstracting features such as oscillators/pll/dfll configuration, clock configuration, System-sensible parameters configuration, buses clocks configuration, sleep mode, reset.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="power__clocks__lib_8h_source.html">power_clocks_lib.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="power__clocks__lib_8c.html#a6a10f502b3248fff54863a281af1da9e">pcl_configure_clocks</a> (pcl_freq_param_t *param)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Device-specific data.  <a href="#a6a10f502b3248fff54863a281af1da9e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="power__clocks__lib_8c.html#ac557cb29483bdd41f36dea2dba5bf9ab">pcl_switch_to_osc</a> (<a class="el" href="power__clocks__lib_8h.html#af1e177f049f666a68c4969ab118bac6b">pcl_osc_t</a> osc, unsigned int fcrystal, unsigned int startup)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Device-specific implementation.  <a href="#ac557cb29483bdd41f36dea2dba5bf9ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="power__clocks__lib_8c.html#a8c02993a038be7348f0363675e6e836a">pcl_configure_usb_clock</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure the USB Clock.  <a href="#a8c02993a038be7348f0363675e6e836a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="power__clocks__lib_8c.html#a22234c65b535937b477c7e988ec2fec5">pcl_write_gplp</a> (unsigned long gplp, unsigned long value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write into the GPLP registers.  <a href="#a22234c65b535937b477c7e988ec2fec5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="power__clocks__lib_8c.html#a1f0120dade42a19b5d5a0f2f217b857a">pcl_read_gplp</a> (unsigned long gplp)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the content of the GPLP registers.  <a href="#a1f0120dade42a19b5d5a0f2f217b857a"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>High-level library abstracting features such as oscillators/pll/dfll configuration, clock configuration, System-sensible parameters configuration, buses clocks configuration, sleep mode, reset. </p>
<ul>
<li>Compiler: IAR EWAVR32 and GNU GCC for AVR32</li>
<li>Supported devices: All AVR32 devices.</li>
<li>AppNote:</li>
</ul>
<dl class="author"><dt><b>Author:</b></dt><dd>Atmel Corporation: <a href="http://www.atmel.com">http://www.atmel.com</a> <br/>
 Support and FAQ: <a href="http://support.atmel.no/">http://support.atmel.no/</a> </dd></dl>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="a6a10f502b3248fff54863a281af1da9e"></a><!-- doxytag: member="power_clocks_lib.c::pcl_configure_clocks" ref="a6a10f502b3248fff54863a281af1da9e" args="(pcl_freq_param_t *param)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long int pcl_configure_clocks </td>
          <td>(</td>
          <td class="paramtype">pcl_freq_param_t *&#160;</td>
          <td class="paramname"><em>param</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Device-specific data. </p>
<p>Automatically configure the CPU, PBA, PBB, and HSB clocks. </p>

</div>
</div>
<a class="anchor" id="a8c02993a038be7348f0363675e6e836a"></a><!-- doxytag: member="power_clocks_lib.c::pcl_configure_usb_clock" ref="a8c02993a038be7348f0363675e6e836a" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long int pcl_configure_usb_clock </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Configure the USB Clock. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Status. </dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>Success. </td></tr>
    <tr><td class="paramname">&lt;0</td><td>An error occured. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1f0120dade42a19b5d5a0f2f217b857a"></a><!-- doxytag: member="power_clocks_lib.c::pcl_read_gplp" ref="a1f0120dade42a19b5d5a0f2f217b857a" args="(unsigned long gplp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long pcl_read_gplp </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>gplp</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read the content of the GPLP registers. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">gplp</td><td>GPLP register index (0,1,... depending on the number of GPLP registers for a given part)</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The content of the chosen GPLP register. </dd></dl>

</div>
</div>
<a class="anchor" id="ac557cb29483bdd41f36dea2dba5bf9ab"></a><!-- doxytag: member="power_clocks_lib.c::pcl_switch_to_osc" ref="ac557cb29483bdd41f36dea2dba5bf9ab" args="(pcl_osc_t osc, unsigned int fcrystal, unsigned int startup)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long int pcl_switch_to_osc </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="power__clocks__lib_8h.html#af1e177f049f666a68c4969ab118bac6b">pcl_osc_t</a>&#160;</td>
          <td class="paramname"><em>osc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>fcrystal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>startup</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Device-specific implementation. </p>
<p>Switch the main clock source to Osc0 configured in crystal mode.</p>
<p>UC3C Device-specific implementation </p>

</div>
</div>
<a class="anchor" id="a22234c65b535937b477c7e988ec2fec5"></a><!-- doxytag: member="power_clocks_lib.c::pcl_write_gplp" ref="a22234c65b535937b477c7e988ec2fec5" args="(unsigned long gplp, unsigned long value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pcl_write_gplp </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>gplp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write into the GPLP registers. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">gplp</td><td>GPLP register index (0,1,... depending on the number of GPLP registers for a given part) </td></tr>
    <tr><td class="paramname">value</td><td>Value to write </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Mon Dec 19 2011 21:04:53 for OpenShoe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
